#include <stdio.h>
short int add2t1(short int *a, short int *b, short int alen, short int blen);
short int time2t1(short int *a, short int *b, short int alen, short int blen);
int main()
{
    short int n, ilen = 0, icp;
    scanf("%hd", &n);
    short int ans[1000] = {0}, ii[200] = {0}, ig[200] = {0};
    short int anslen = 1, iglen = 1, im1glen = 1;
    ig[0] = 1;
    for (int i = 1; i < n + 1; i++)
    {
        ilen = 0;
        icp = i;
        for (int j = 0; icp > 0; j++)
        {
            ii[j] = icp % 10;
            icp /= 10;
            ilen++;
        }
        iglen = time2t1(ig, ii, iglen, ilen);
        anslen = add2t1(ans, ig, anslen, iglen);
    }
    for (int i = 0; i < anslen; i++)
    {
        printf("%d", ans[anslen - i - 1]);
    }
}
short int time2t1(short int *a, short int *b, short int alen, short int blen)
{
    short int tmp[200] = {0};
    short int tmplen = blen + alen - 1;
    for (int i = 0; i < blen; i++)
    {
        for (int j = 0; j < alen; j++)
        {
            tmp[i + j] += b[i] * a[j];
        }
    }
    for (int i = 0; i < blen + alen - 1; i++)
    {

        if (tmp[i] >= 10)
        {
            if (i == blen + alen - 2)
            {
                tmplen = blen + alen;
            }
            tmp[i + 1] += tmp[i] / 10;
            tmp[i] = tmp[i] % 10;
        }
    }

    for (int i = 0; i < tmplen; i++)
    {
        a[i] = tmp[i];
    }
    return tmplen;
}
short int add2t1(short int *a, short int *b, short int alen, short int blen)
{
    short int len;
    if (alen >= blen)
    {
        len = alen;
    }
    else
    {
        len = blen;
    }
    for (int i = 0; i < blen; i++)
    {
        a[i] += b[i];
    }
    for (int i = 0; i < len; i++)
    {
        if (a[i] >= 10)
        {
            if (i == len - 1)
            {
                len++;
            }
            a[i + 1]++;
            a[i] %= 10;
        }
    }
    return len;
}